package com.kgcx.opc.common.utils.io;

import com.kgcx.opc.common.exceptions.BusinessException;
import lombok.extern.slf4j.Slf4j;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * PropertiesUtil
 * @author
 * @date 2014-5-21 下午6:22:11
 */
@Slf4j
public class PropertiesUtil {

	public static Properties getProperties(String path){
		InputStream stream = ResourceUtil.getResourceAsStream(path);
		Properties p = new Properties();
		try {
			p.load(stream);
			return p;
		} catch (IOException e) {
			log.debug(e.getMessage());
			throw new BusinessException();
		}
	}
}
